{extend name='main'}

{block name="button"}

{if auth("add")}
<button data-modal='{:url("add")}' data-title="添加学时" class='layui-btn layui-btn-sm layui-btn-primary' >添加学时</button>
{/if}

{/block}
{block name="content"}
<div  class="think-box-shadow">
    {include file='eduhour/index_search'}
    <table class="layui-table" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
            </th>
            <th class='layui-hide-xs'>报名号</th>
            <th class='layui-hide-xs'>证书编号</th>
            <th class='layui-hide-xs'>培训名称</th>
            <th class='layui-hide-xs'>学员姓名</th>
            <th class='layui-hide-xs'>工作单位</th>
            <th class='layui-hide-xs'>分配班级</th>
            <th class='layui-hide-xs'>已完成学时</th>
            <th class='layui-hide-xs'>完成时间</th>
            <th class='layui-hide-xs'>操作</th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}

        <tr  data-dbclick>
            <td class='list-table-check-td think-checkbox'>
                <label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
            </td>
            <td class="nowrap">{$vo.no}</td>
            <td class="nowrap">{$vo.cert}</td>
            <td style="width:100px;">{$vo.class_info.name}</td>
            <td class="nowrap">{$vo.name}</td>
            <td style="width:100px;">{$vo.company}</td>
            <td style="width:100px;" class="nowrap">
                {$vo.room_no}<br />{if $vo.seat_no} 座位号：{/if}{$vo.seat_no}
            </td>
            <td class="nowrap">{$vo.hour}</td>
            <td class="nowrap">{$vo.create_at|format_datetime='Y-m-d'}</td>
            <td  class='text-center nowrap notselect'>
                {if auth("edit")}
                    <a data-dbclick class="layui-btn layui-btn-sm" data-title="修改学时" data-modal='{:url("edit")}?id={$vo.id}'>修改学时</a>
                {/if}
            </td>
        </tr>

        {/foreach}
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}


